package com.insigma.business.qrcode.soldier.service.impl;

import com.insigma.business.qrcode.common.service.SequenceGenerator;
import com.insigma.business.qrcode.soldier.dao.SoldierDisabledInfoDao;
import com.insigma.business.qrcode.soldier.dto.SequenceNameConstant;
import com.insigma.business.qrcode.soldier.dto.searcher.SoldierDisabledInfoBSearcher;
import com.insigma.business.qrcode.soldier.entity.SoldierDisabledInfoDO;
import com.insigma.business.qrcode.soldier.service.SoldierDisabledInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("soldierDisabledInfoService")
public class SoldierDisabledInfoServiceImpl implements SoldierDisabledInfoService {

    @Autowired(required = false)
    private SoldierDisabledInfoDao soldierDisabledInfoDao;
    @Autowired(required = false)
    private SequenceGenerator sequenceGenerator;

    
    @Override
    public List<SoldierDisabledInfoDO> search(final SoldierDisabledInfoBSearcher soldierDisabledInfoBSearcher) {
        return soldierDisabledInfoDao.search(soldierDisabledInfoBSearcher);
    }
   
    @Override
    public SoldierDisabledInfoDO get(final String id){
        return soldierDisabledInfoDao.get(id);
    }

    
    @Override
    public Integer insert(final SoldierDisabledInfoDO soldierDisabledInfoDO){
        soldierDisabledInfoDO.setId(sequenceGenerator.genKey(SequenceNameConstant.SOLDIER_DISABLED_INFO_ID));
        return soldierDisabledInfoDao.insert(soldierDisabledInfoDO);
    }

    
    @Override
    public Integer update(final SoldierDisabledInfoDO soldierDisabledInfoDO){
        return soldierDisabledInfoDao.update(soldierDisabledInfoDO);
    }

    
    @Override
    public Integer delete(final String id, final String modifierType, final String modifierId){
        return soldierDisabledInfoDao.delete(id,modifierType,modifierId);
    }

    @Override
    public SoldierDisabledInfoDO getSoldierDisabledInfoByIdCardNo(String idCardNo) {
        return soldierDisabledInfoDao.getSoldierDisabledInfoByIdCardNo(idCardNo);
    }

}
